package sist.aop.annotation;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class SearchAdvice {
	
	/*@Before("execution(public * sist.aop.annotation.Search*.*())")
	public void dataAttributeSearch(JoinPoint jp){
		  Signature signature= jp.getSignature();
		  String methodName=signature.getName();
		  Date date=new Date();
		  System.out.println(methodName+" "+date);	
		  if(methodName.equals("fileSearch")){
			  System.out.println("ValidateCheck");			  
		  }
		  if(methodName.equals("xmlParsing")){
			  System.out.println("DomParsingCount");				  
		  }
		  if(methodName.equals("domSaxSearch")){
			  System.out.println("FileSizeCheck");  
		  }	
	}	
	@After("execution(public * sist.aop.annotation.Search*.*())")
	  public void annotaionAfter(){
		System.out.println("annotaionAfter");
	}
	
	@AfterReturning("execution(public * sist.aop.annotation.Search*.*())")
	public void annotaionAfterReturing(){
		System.out.println("annotaionAfterReturing");
	}
	@AfterThrowing("execution(public * sist.aop.annotation.Search*.*())")
	public void execeptionMethod(){
		System.out.println("execeptionMethod");
	}*/
	@Around("execution(public * sist.aop.annotation.Search*.*())")
	
	public void aroundMethod(ProceedingJoinPoint jp){
		System.out.println("Before�Դϴ�");
		try{
			jp.proceed();
		}catch(Throwable e){			
		}		
		System.out.println("After");		
	}	

}
















